/**
 * 
 */
package com.aibili.pojo;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 * 动态评论表
 * 
 * @author qiuch
 * 
 */
@Entity
@Table(name = "t_moment_comment")
public class MomentComment implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 6734740117231616299L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "id", length = 11, nullable = false)
	private long id;

	@Column(name = "moment_id", length = 11, nullable = false)
	private long moment_id;// 动态id

	@OneToOne(cascade = CascadeType.REFRESH, fetch = FetchType.EAGER, targetEntity = UserInfo.class)
	@JoinColumn(name = "user_id", nullable = false, updatable = false)
	private UserInfo user;// 发布用户id

	@Column(name = "content")
	private String content;// 评论内容
	
	@Column(name = "mention_id", columnDefinition = "TINYINT(1) DEFAULT 0")
	private long mention_id;// 被提到的好友的id

	@Column(name = "create_time", columnDefinition = "TIMESTAMP default CURRENT_TIMESTAMP")
	private Date create_time;// 发布时间
	
	@Column(name = "is_delete", columnDefinition = "TINYINT(1) DEFAULT 0")
	private int is_delete;

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public long getMoment_id() {
		return moment_id;
	}

	public void setMoment_id(long moment_id) {
		this.moment_id = moment_id;
	}

	public UserInfo getUser() {
		return user;
	}

	public void setUser(UserInfo user) {
		this.user = user;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Date getCreate_time() {
		return create_time;
	}

	public void setCreate_time(Date create_time) {
		this.create_time = create_time;
	}

	public int getIs_delete() {
		return is_delete;
	}

	public void setIs_delete(int is_delete) {
		this.is_delete = is_delete;
	}

	public long getMention_id() {
		return mention_id;
	}

	public void setMention_id(long mention_id) {
		this.mention_id = mention_id;
	}

}
